Node-RED block in Snap4City Microservice library node-red-contrib-snap4city-user is "fiware-orion-out-v2">
Provides a node for sending generic json payload to Fiware Orion context broker.
Configuration
- Authentication (only available on edge scenario)
- Configuration options for Snap4city Authentication (optional)
- Service
- The URL and port of the Fiware Orion context broker (mandatory).
The URL should not contains any prefix for http/https and any port information (valid example are: 192.168.1.10 or www.example.it or orionUNIFI)
- Certificates
- Configuration for TLS connections (optional). If "verify server certificate" is selected, the CA certificate is mandatory
- Device type
string
- Context element entity type (optional)
- Device NameID
string
- Context element entity id (optional)
- key 1
string
- K1 credential to be specified for context broker secured via Snap4City-OrionFilter (optional)
- key 2
string
- K2 credential to be specified for context broker secured via Snap4City-OrionFilter (optional)
- apikey
string
- Credential to be specified for context broker secured via HTTP Header "apikey:<credential>" (optional)
- auth
string
- Credential to be specified for context broker secured via HTTP Header "Authorization: <credential>" (optional).
If this parameter is not specified, the Snap4City SSo AccessToken will be used (based on (cloud scenario)
the logged user credentials or (edge scenario) the specified username/password) in the form of "Authorization: Bearer <credential>"
- name
string
- Label assigned to the current node (optional)
Inputs
A JSON representing the payload to send to the Fiware Orion context broker. Can be:
- the complete contextElements (not an array):
msg.payload = { "id": "angelo-mydevice001", "type": "test-device", "attributes": [{ "name": "temperatura", "value": "8", "type": "float" }] };
NOTE: if msg.payload.type and msg.payload.id are not present, the "Device type" and "Device NameID" has to be specified in the Configuration section (mandatory)
- the simple attributes (an array)
msg.payload = [{ "name": "temperatura", "value": "12", "type": "float" }];
NOTE: the "Device type" and "Device NameID" has to be specified in the Configuration section (mandatory)
Details
The node receive a JSON as described in the Inputs section and send a message to the Fiware Broker context broker based on the specified Configuration.
If the values are not present in the input JSON an error is generated.